package com.forezp.servicefeign.clients;

import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(value = "service-hi")
public interface SchedualServiceHi {
    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    String sayHiFromClientOne(@RequestParam(value = "name") String name);

    /*
    @PathVariable，路径参数，路径变量
    nested exception is java.lang.IllegalStateException: PathVariable annotation was empty on param 0.
    @RequestMapping(value = "/getUserInfo/{uid}")
    String getUserInfo(@PathVariable Long uid);*/
    @RequestMapping(value = "/getUserInfo/{uid}")
    String getUserInfo(@PathVariable(value = "uid") Long uid);

}
